library(tidyverse)
Registered S3 methods overwritten by 'dbplyr':
method from
print.tbl_lazy
print.tbl_sql
── Attaching packages ───────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.3 ✓ purrr 0.3.4
✓ tibble 3.0.6 ✓ dplyr 1.0.5
✓ tidyr 1.1.3 ✓ stringr 1.4.0
✓ readr 1.4.0 ✓ forcats 0.5.1
── Conflicts ──────────────────────────────── tidyverse_conflicts() ──
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
library(tidyverse)
library(sf)
Linking to GEOS 3.8.1, GDAL 3.1.4, PROJ 6.3.1
scotland <- read_sf("~/SG_NHS_HealthBoards_2019.shp")
GDAL Error 4: Unable to open /Users/emilyjaco/SG_NHS_HealthBoards_2019.shx or /Users/emilyjaco/SG_NHS_HealthBoards_2019.SHX. Set SHAPE_RESTORE_SHX config option to YES to restore or create it.Error: Cannot open "/Users/emilyjaco/SG_NHS_HealthBoards_2019.shp"; The source could be corrupt or not supported. See `st_drivers()` for a list of supported formats.
class(scotland)
[1] "sf" "tbl_df" "tbl" "data.frame"
head(scotland, 14)
Simple feature collection with 14 features and 4 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 5512.998 ymin: 530250.8 xmax: 470332 ymax: 1220302
Projected CRS: OSGB 1936 / British National Grid